package com.heima.admin.controller;

import com.heima.admin.service.AdUserService;
import com.heima.model.common.dtos.AdminLoginDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login/in")
@Slf4j
public class AdminLoginController {
    @Autowired
    private AdUserService adUserService;
    @PostMapping("")
    public ResponseResult Login(@RequestBody AdminLoginDto loginDto){
        log.info("传入登录信息为：{}",loginDto);
        return adUserService.login(loginDto);
    }
}
